package com.yalu.entity.data;

import java.io.Serializable;

import javax.persistence.Embeddable;

import org.apache.commons.lang.StringUtils;

@Embeddable
public class ReasonsKey implements Serializable{


	private static final long serialVersionUID = 3083984295555252402L;
	private String reason;//
	private String attribute;//

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass().getPackage() != obj.getClass().getPackage()) {
			return false;
		}
		final ReasonsKey other = (ReasonsKey) obj;
		return StringUtils.equals(reason, other.getReason()) && StringUtils.equals(attribute,other.getAttribute());
	}
	@Override
	public int hashCode() {
		return reason == null ? System.identityHashCode(this) : reason.hashCode();
	}

	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public String getAttribute() {
		return attribute;
	}
	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}

}
